<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>修改商品信息</title>
    <link th:href="@{/css/bootstrap.css}" rel="stylesheet">
    <script th:src="@{/js/bootstrap.js}" rel="stylesheet"></script>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
            margin: 20px;
        }
        .container {
            margin-top: 20px;
        }
        .page-header h1 {
            margin-top: 20px;
        }
        form {
            margin-top: 20px;
        }
        label {
            font-weight: bold;
            margin-top: 10px;
        }
        .form-group {
            margin-bottom: 20px;
        }
        input[type='submit'] {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 10px 20px;
            cursor: pointer;
        }
        input[type='submit']:hover {
            background-color: #0056b3;
        }

    </style>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="page-header">
                <h1>修改商品</h1>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12 text-right">
            <a class="btn btn-primary" th:href="@{/allManageProduct}">返回</a>
        </div>
    </div>
    <form method="post" th:action="@{/updateProduct}" class="col-md-6">
        <input type="hidden" name="product_id" th:value="${product.product_id}">
        <div class="form-group">
            <label>商品名称:</label>
            <input type="text" id="product_name" name="product_name" class="form-control" th:value="${product.product_name}">
        </div>
        <div class="form-group">
            <label>商品价格:</label>
            <input type="text" id="unit_price" name="unit_price" class="form-control" th:value="${product.unit_price}">
        </div>
        <div class="form-group">
            <input type="submit" value="修改商品" class="form-control">
        </div>
    </form>
</div>
</body>
</html>
